package study.job.elasticjob.job;

import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class _1_MySimpleJob implements SimpleJob {

    @Override
    public void execute(ShardingContext context) {
        //
        String param = context.getJobParameter();
        log.info("{}", param);

       //
        int t = context.getShardingTotalCount(); //分片总数
        int index = context.getShardingItem();  //分片序号
//        context.get

        log.info("sssssssssss");
    }
}